home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PASCALL
/
TEMPJUNK
/
FERN.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-10-05
|
718b
|
49 lines
program gottt;
uses
crt;
type
stevex=1..80;
stevey=1..24;
var
x1,x2:stevex;
y1,y2:stevey;
sx, sy, y, i:integer;
procedure update;
begin
x1:=x1+sx;
y1:=y1+sy;
gotoxy(x1,y1);
write('*');
gotoxy(x2,y2);
write(' ');
end;
procedure go;
begin
x2:=x1;
y2:=y1;
if x1+sx>80 then sx:=(sx*(-1));
if x1+sx<2 then sx:=(sx*(-1));
if y1+sy>24 then sy:=(sy*(-1));
if y1+sy<2 then sy:=(sy*(-1));
update;
end;
begin
clrscr;
sx:=1;
sy:=1;
x1:=1;
y1:=1;
x2:=1;
y2:=1;
for y:=1 to 1000 do
begin
go;
DELAY(25);
end;
end.